package services;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import javax.annotation.PostConstruct;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;

import modelo.Caracteristica;
import dao.CaracteristicaDao;

@ManagedBean(name="caracteristicaService", eager = true)
@ApplicationScoped
public class CaractersticaService implements Serializable {

	private static final long serialVersionUID = 254357858094930239L;

	private Caracteristica caracteristica;
	private List<Caracteristica> listCaracteristica=new ArrayList<Caracteristica>();
	private CaracteristicaDao caracteristicaDao=new CaracteristicaDao();
	
	public CaractersticaService() {
		super();
	}
	
	@PostConstruct
	public void init() {
		listCaracteristica = caracteristicaDao.obtenerCaracteristicas();
	}
	
//	public List<Caracteristica> obtenerCaracteristicas(){
//		return caracteristicaDao.obtenerCaracteristicas();
//    }
	
	public void guardarCaracteristica(Caracteristica c){
//		caracteristicaDao.guardarCaracteristica(c);
    }
    public void eliminarCaracteristica(Caracteristica c){
//    	caracteristicaDao.eliminarCaracteristica(c);
    }

	public Caracteristica getCaracteristica() {
		return caracteristica;
	}

	public void setCaracteristica(Caracteristica caracteristica) {
		this.caracteristica = caracteristica;
	}

	public List<Caracteristica> getListCaracteristica() {
		return listCaracteristica;
	}

	public void setListCaracteristica(List<Caracteristica> listCaracteristica) {
		this.listCaracteristica = listCaracteristica;
	}

	public CaracteristicaDao getCaracteristicaDao() {
		return caracteristicaDao;
	}

	public void setCaracteristicaDao(CaracteristicaDao caracteristicaDao) {
		this.caracteristicaDao = caracteristicaDao;
	}
	
	
}
